<?php
/**
 * @version		$Id: helper.php 21020 2011-03-27 06:52:01Z infograf768 $
 * @package		Joomla.Site
 * @subpackage	mod_je_location
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;

/**
 * @package		Joomla.Site
 * @subpackage	mod_je_location
 * @since		1.5
 */
class modJELocationHelper
{
	static function &getList(&$params)
	{
		$db		= JFactory::getDbo();
		$result = array();
		
		$query = "SELECT DISTINCT i.id, i.name FROM #__je_info i JOIN #__je_product_info pi ON i.id = pi.info_id WHERE i.state = 1 ORDER BY i.ordering ASC, i.name ASC";
		$db->setQuery($query);
		
		$result = $db->loadObjectList();
		
		return $result;
	}
}